# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-mimesis
pkgver=11.1.0
pkgrel=1
pkgdesc="The Fake Data Generator"
url="https://mimesis.name"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-colorama py3-pytest-xdist py3-validators py3-tz"
subpackages="$pkgname-pyc"
source="https://github.com/lk-geimfari/mimesis/archive/v$pkgver/mimesis-$pkgver.tar.gz"
builddir="$srcdir/mimesis-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k 'not test_schema and not test_internet' --ignore=tests/test_builtins/test_usa_spec.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5cd3b8e63d8743bc9bf73ddf8e7f9dd26b4466aeef1acce04e987dbab4e719b5514a78a64c80fcffbfb65703ea2b0571dff40e7fdca8e48fec650c3d40e2870f  mimesis-11.1.0.tar.gz
"
